﻿using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.game
{
    //同步游戏信息
    public class GameUserInfoRet : Message
    {
        public static int TYPE = 12;
        public static int ID = 8;

        public string userName { get; set; }
        public string avatar { get; set; }
        public int sex { get; set; }
        public int roomCard { get; set; }
        public int totalScore { get; set; }
        public int locationIndex { get; set; }
        public int userId { get; set; }
        public string ip { get; set; }
        public bool isMiddleJoin { get; set; }
        public bool isReady { get; set; }
        public bool online { get; set; }
        public bool isTrusteeship { get; set; }
        public string longitude { get; set; }
        public string latitude { get; set; }
   
        public void decode(Input _in)
        {
            userName = _in.readString();
            avatar = _in.readString();
            sex = _in.readInt();
            roomCard = _in.readInt();
            totalScore = _in.readInt();
            locationIndex = _in.readInt();
            userId = _in.readInt();
            ip = _in.readString();
            isMiddleJoin = _in.readBoolean();
            isReady = _in.readBoolean();
            online = _in.readBoolean();
            isTrusteeship = _in.readBoolean();
            longitude = _in.readString();
            latitude = _in.readString();
        }

        public void encode(Output _out)
        {
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "GameUserInfoRet [userName=" + userName + ",avatar=" + avatar + ",sex=" + sex + ",roomCardTex=" + roomCard +
                   ",userTotalScore=" + totalScore + ",UserID=" + locationIndex + ",userId=" + userId + ",ip=" + ip
                  + ", isMiddleJoin= " + isMiddleJoin + ", isPerpare =" + isReady + ",online=" + online+", isTrusteeship="+isTrusteeship + "longitude=" +
                   longitude + "latitude= " + latitude + ", ]";
        }
    }
}